<template>
  <div class="content">
    <div class="header">
      <div class="header-circle"><i class="iconfont icon-my"></i></div>
      <p @click="click()">{{username}}</p>
    </div>
    <div class="onerow">
      <span class="circle circle1"><i class="iconfont icon-notetext"></i></span>
      <span class="mine">我的订单</span>
      <span class="all">全部订单</span>
      <img src="../../assets/img/arrow.png" alt="">
    </div>
    <ul class="tworow">
      <li><i class="iconfont icon-notetext"></i>全部</li>
      <li><i class="iconfont icon-1"></i>代付款</li>
      <li><i class="iconfont icon-shouhuoyihuifu"></i>待收货</li>
      <li><i class="iconfont icon-wancheng"></i>已完成</li>
    </ul>
    <ul class="threerow">
      <li>
        <span class="circle circle2"><i class="iconfont icon-file-o-copy"></i></span>
        <span class="mine">收藏的文章</span>
      </li>
      <li>
        <span class="circle circle3"><i class="iconfont icon-bag"></i></span>
        <span class="mine">收藏的商品</span>
      </li>
    </ul>
    <ul class="threerow lastrow">
      <li>
        <span class="circle circle4"><i class="iconfont icon-youhuijuan"></i></span>
        <span class="mine">我的优惠劵</span>
      </li>
      <li>
        <span class="circle circle5"><i class="iconfont icon-location"></i></span>
        <span class="mine">收货地址管理</span>
      </li>
      <li>
        <span class="circle circle6"><i class="iconfont icon-wenti"></i></span>
        <span class="mine">常见问题</span>
      </li>
      <li>
        <span class="circle circle7"><i class="iconfont icon-message"></i></span>
        <span class="mine">联系客服</span>
      </li>
      <li>
        <span class="circle circle8"><i class="iconfont icon-email"></i></span>
        <span class="mine">问题反馈</span>
      </li>
      <li>
        <span class="circle circle9"><i class="iconfont icon-shezhi"></i></span>
        <span class="mine" @click="cancel()">注销用户</span>
      </li>
    </ul>
  </div>
</template>
<script type="text/ecmascript-6">

    export default {
      data(){
        return{
          username:"点击登录"
        }
      },
      mounted:function(){
//        console.log(this.$route.query.username);
        if(this.$route.query.username!=undefined){
          this.username=(this.$route.query.username);
        }
      },
      methods:{
        click:function () {
          this.$router.push({path:"/login"})
        },
        cancel:function () {
          this.removeCookie("username");
          this.username=this.getCookie("username");
          if (this.username==null){
            this.username="点击登录"
          }
        }

      }
    }
</script>
<style scoped>
  .content{
    overflow-y: auto ;
    overflow-x: hidden;
    width: 100%;
    flex: 1;
    background:#F7F7F7;
  }
  .header{
    width: 100%;
    height: 2.3rem;
    background-color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .header-circle{
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background-color: #AAAAAA;
    display: flex;
    justify-content: center;
    align-items: center;

  }
  .header-circle .iconfont{
    font-size: 0.5rem;
    color: #D2D2D2;
  }
  .header p{
    margin-top: 0.15rem;
    font-size: 0.14rem;
  }
  .circle{
    display: inline-block;
    width: 0.3rem;
    height: 0.3rem;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #ffffff;
    font-size: 0.16rem;
    border-radius: 50%;
    margin-right: 0.15rem;
  }
  .circle .iconfont{
    font-size: 0.18rem;
  }
  .onerow{
    margin-top: 0.1rem;
    background-color: white;
    width: 100%;
  //height: 0.55rem;
    padding: 0.15rem;
    box-sizing: border-box;
    border-bottom: 1px solid #DDDDDD;
    overflow: hidden;
    display: flex;
    align-items: center;
  }
  .onerow .circle1{
    background-color: #E44484;
    float: left;
  }
  .mine{
    font-size: 0.16rem;
    float: left;
  }
  .onerow .all{
    color: #9b9b9b;
    font-size: 0.14rem;
    margin-right: 0.07rem;
    margin-left: 1.6rem;
  }
  .onerow img{
  //background-color: #9b9b9b;
    width: 0.1rem;
    height: 0.15rem;
  }
  .tworow{
    width: 100%;
    padding: 0.25rem;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    display: flex;
    background-color: white;
    overflow: hidden;
    justify-content: space-around;
    font-size: 0.12rem;
    color: #999999;
  }
  .tworow li{
    display: flex;
    flex-direction:column;
    justify-content: space-between;
    align-items: center;
  }
  .tworow li .iconfont{
    font-size: 0.26rem;
    color: #000;
    margin-bottom: 0.15rem;
  }
  .threerow{
    overflow: hidden;
    width: 100%;
    background-color: white;
    margin-top: 0.1rem;
    padding:0 0.15rem;
    box-sizing: border-box;
  }
  .threerow li{
    padding: 0.15rem 0;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #DDDDDD;
  }
  .threerow li .circle2{
    background-color: #EDCF31;
  }
  .threerow li .circle3{
    background-color: #8D8DBE;
  }
  .threerow li .circle4{
    background-color:#EE9F3F;
  }
  .threerow li .circle5{
    background-color: #7EC370;
  }
  .threerow li .circle6{
    background-color: #E1B234;
  }
  .threerow li .circle7{
    background-color: #ADC149;
  }
  .threerow li .circle8{
    background-color: #77A9DD;
  }
  .threerow li .circle9{
    background-color: #E1B234;
  }
  .threerow li:last-child{
    border:none;
  }
  .lastrow{
    margin-bottom: 0.3rem;
  }
</style>
